﻿using SQLite.CodeFirst;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RinNote.Server.Model
{
    class RinNoteContextInitializer : SqliteCreateDatabaseIfNotExists<RinNoteContext>
    {
        public RinNoteContextInitializer(DbModelBuilder modelBuilder)
        : base(modelBuilder) { }

        protected override void Seed(RinNoteContext context)
        {
            context.Set<Account>().Add(new Account()
            {
                AccountID = "1",
                UserName = "admin",
                Password = "admin",
                Role=AccountRole.ADMIN
            });
        }
    }
}
